package com.song.controller;

import com.song.pojo.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @Author Klys
 * @Date 2023/6/5 17:02
 * @Description
 * @Version 1.0
 */
@Controller
public class HttpPyController {

    @GetMapping("/test")
    @ResponseBody
    public String test() {
        String s = new String("123");
        if (s.startsWith("1")) {
            System.out.println(s);
        }
        return "我是Java";
    }

    @GetMapping("/pytest01")
    public String pytest01() {
        return "我是Java";
    }

    @GetMapping("/pytest02")
    @ResponseBody
    public String pytest02(User user) {
        return user.getUserName() + "-----" + user.getPwd();
    }


}
